﻿namespace WoWArmoryParser
{
    public class GamesInfo
    {

        protected int _Played;
        protected int _Wins;

        public int Played
        {
            get { return _Played; }
            internal set { _Played = value; }
        }

        public int Wins
        {
            get { return _Wins; }
            internal set { _Wins = value; }
        }

        public int Losses
        {
            get { return (_Played - _Wins); }
        }

        public double WinPercentage
        {
            get
            {
                if (_Played == 0 || _Wins == 0)
                {
                    return 0;
                }
                else
                {
                    return (_Wins / _Played);
                }
            }
        }
    }
}
